<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp"%>
<script type="text/javascript" >
$(function(){
	$('#backMail').bind('click',function(){
		CQOA.hideDiv('extendDiv');
		CQOA.showDiv('mainDiv');
	});
	$('#replayMail').bind('click',function(){
		
	});
	$('#trunMail').bind('click',function(){
		
	});
	$('#delMail').bind('click',function(){
		$.messager.confirm('提示信息','你确定要删除这条数据?',function(o){
			if(o){
				postcommit(ctx+'/pof/Mail!delete.action',{'entity.sid':$('#recordId').val()},function(rel){
					if(rel.success){
						CQOA.hideDiv('extendDiv');
						CQOA.showDiv('mainDiv');
						$('#'+$('#gridId').val()).datagrid('reload');
					}
					$.messager.show({
						msg : rel.msg
					});
				});
			}
		});
	});
	
});
</script>
<div class="easyui-layout" fit="true" border="false">
	        <div id="easyui-title" style="display:none">
	            	邮件查看
	        </div>
	        <div class="top_toolbar_div" region="north" border="false" style="height: 30px;">     
	        		<a href="#" class="easyui-linkbutton" id="backMail">返回</a>           
                    <a href="#" class="easyui-linkbutton" id="replayMail">回复</a>
                    <a href="#" class="easyui-linkbutton" id="trunMail">转发</a>
                    <a href="#" class="easyui-linkbutton" id="delMail">删除</a>
            </div>
           <div  region="center" border="false">
           		<s:hidden id="recordId" name="mailDto.mailRecord.sid"></s:hidden>
           		<s:hidden id="gridId" ></s:hidden>
           		<table >
                     <tr>
                       <td colspan="4">
                         	&nbsp;<font face="微软雅黑" size="4">
                         		<b>
                        			<s:if test="mailDto.mail.isUrgent==1"><b>紧急:</b></s:if><s:property escape="true" value="mailDto.mail.title" />
                        		</b>
                        	</font>
                        	
                       </td>
                     </tr>
                     <tr>
                        <td align="right" style="width: 80px;">
	                        &nbsp;<font face="微软雅黑" color="#9D9D9D">
	                      		     发件人：
	                      	</font>
                        </td>
                        <td colspan="2">
                        	<s:property escape="true" value="mailDto.mail.sendCname" />
                        </td>
                         <td></td>
                    </tr>
                    <tr>
                    	<td align="right" style="width: 80px;">
                    	&nbsp;<font face="微软雅黑" color="#9D9D9D">
	                      		    日&nbsp;&nbsp;&nbsp;&nbsp;期：
	                      	</font>
                    	</td>
                    	<td colspan="3">
                    		<font face="微软雅黑" color="#9D9D9D">
                           	 <s:date name="mailDto.mail.sendTime" format="yyyy-MM-dd HH:mm:ss"/>
                            </font>
                    	</td>
                    </tr>
                    <tr>
                        <td align="right" style="width: 80px;">
                       		&nbsp;	 <font face="微软雅黑" color="#9D9D9D">
                      		     收件人：
                      		     </font>
                        </td>
                        <td colspan="2">
                        	<s:property escape="true" value="mailDto.mail.sendTo" />
                         </td>
                         <td>
                         <font face="微软雅黑" color="#9D9D9D">
                           [显示所有收件人]
                           </font>
                         </td>
                    </tr>
                    <tr>
                        <td align="right" style="width: 80px;">
                        &nbsp; <font face="微软雅黑" color="#9D9D9D">
                                                                                     抄送人：
                          </font>
                        </td>
                        <td colspan="3">
                        	<div>
                            <s:property escape="true" value="mailDto.mail.copyTo" />
                            </div>
                         </td>
                    </tr>
                    <tr>
                        <td align="right" style="width: 80px;">
                       &nbsp; <font face="微软雅黑" color="#9D9D9D">	
                        	附&nbsp;&nbsp;&nbsp;&nbsp;件：
                        </font>
                        </td>
                   		 <td colspan="3">
                   			<s:iterator value="#mailDto.smFiles" var="mailFile" id="mailFile">
              				     <div style="background-color:#F0F0F0">
                                  <p>
                                  	<s:property value="#mailFile.cname" escape="true"/>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onClick="downloadFile(${mailFile.sid});" style="color: blue;">下载</a>
                                   </p>
                                 </div>
                            </s:iterator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" style="width: 80px;">
                        &nbsp; <font face="微软雅黑" color="#9D9D9D">
                                                                                    正&nbsp;&nbsp;&nbsp;&nbsp;文：
                          </font>
                        </td>
                        <td colspan="3">
                        	<div style="width:100%;height:100%;background-color:#fff;overflow:auto;line-height:normal">
			                	 <s:property escape="false" value="mailDto.mail.msg" />
			                </div>
                         </td>
                    </tr>
                </table>
           </div>
</div>



